import os

import acoustic_feature as AF
import util.file as RF
import util.IO as RI
def file_name(file_dir):
    for root, dirs, files in os.walk(file_dir):
        print("-----------")
        print(root)   #os.walk()所在目录
        print(dirs)   #os.walk()所在目录的所有目录名
        print(files)   #os.walk()所在目录的所有非目录文件名
        print(" ")
        return files
if __name__ == '__main__':


    root='D:\大二下\数据科学\带作业\SVM'
    root2='D:\大二下\数据科学\带作业\SVM'
    data=RF.read(root+'\\'+'negativeAll.csv')
    data2=RF.read(root2+'\\'+'positiveAll.csv')
    data2.extend(data)
    RF.write(root2+'\\'+'positiveAll.csv',data2)
    '''
    for i in range(files.__len__()):
        try:
            oneLineXs=AF.my_acoustic_features(root+'\\'+files[i],frame_len=1024)
        except:
            continue
        oneLineXs=oneLineXs.tolist()
        oneLineXs.insert(0,i)
        data.append(oneLineXs)
        RF.write(root + '\\' + 'negative.csv', data)
        RI.progressBar(i,files.__len__())
    RF.write(root+'\\'+'negative.csv',data)
    '''
